package cn.luoshaocheng.system.mapper;

import cn.luoshaocheng.basic.mapper.BaseMapper;
import cn.luoshaocheng.system.domain.Permission;
import cn.luoshaocheng.system.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    //根据sn查询permission
    Permission loadBySn(String RoleSn);

    void delete(Long id);

    void removeRolePermissionByRoldId(Long id);

    void removeRoleMenuByRoldId(Long id);

    void saveRolePermission(@Param("rid") Long id, @Param("permissions") List<Long> permissions);

    void saveRoleMenu(@Param("rid") Long id, @Param("menus")List<Long> menus);
}
